﻿using AutoMapper;
using B.S.Production.Domain.Entities;
using B.S.Production.Write.API.Application.Command.BomMainMaterialsRequiredCommand;
using B.S.Production.Write.API.Application.Command.MaterialsRequiredCommand;
using B.S.Production.Write.API.Application.Command.ProductionOrderCommand;

namespace B.S.Production.Write.API
{
    public class MappingProfile:Profile
    {
        public MappingProfile()
        {
            //生产订单
            CreateMap<AddProductionOrderCommand, ProductionOrder>().ReverseMap();
            CreateMap<UpdateProductionOrderCommand, ProductionOrder>().ReverseMap();
            //所需物料
            CreateMap<AddBomMainMaterialsRequiredCommand, BomMainMaterialsRequired>().ReverseMap();
            CreateMap<AddMaterialsRequiredCommand, MaterialsRequired>().ReverseMap();
            CreateMap<UpdateMaterialsRequiredCommand, MaterialsRequired>().ReverseMap();
        }
    }
}
